<template>
    <div>
        <el-container>
            <el-header height="75px">小U后台管理系统
                <!-- <div>欢迎用户:{{ $store.getters.getUser.username }}</div> -->
                <!-- <div>欢迎用户:</div> -->
                <div id="boxxx">
                   <span> 过来！！！！</span>
                <div class="close">
                <el-button  @click="out" type="danger" size="small">退出</el-button></div></div>
            </el-header>
            <el-container>
                <el-aside width="200px">
                    <v-nav></v-nav>
                </el-aside>
                <el-main>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script>
import vNav from '../components/vNav.vue'

export default {
    components: {
        vNav
    },
    mounted(){
         
    },
    methods: {
        out() {
            //清空存储
            this.$store.dispatch('changeUserAction', false);
            //跳转登陆
            this.$router.push('/login')
        }
    },
   
}
</script>

<style scoped>
.el-header {
    background-color:black;
    color: #fff;
    text-align: center;
    padding-top: 30px;
    font-weight: bold;
    position: relative;
}
.el-button{
    float: right;
    position: absolute;
    top: 20px;
    right: 20px;
}

#boxxx{
    width: 100px;
    height: 45px;
    float: right;
    margin-bottom: 20px;
}
.close{
    display: none;
}
#boxxx:hover .close{
    display: block;
}
#boxxx:hover span{
    display: none;
}
</style>